#ifndef LAURIN_MODULE_HANDLER_H_
#define LAURIN_MODULE_HANDLER_H_

#include <glibmm/ustring.h>
#include <glibmm/thread.h>

class LaurinModuleHandler
{

	public:

		virtual ~LaurinModuleHandler();

		void moduleWorkingComplete(bool error);
		void setError(Glib::ustring errorMessage);
		Glib::ustring getErrorMessage() const;

		bool isErrorRaised() const;
		bool isRunning() const;


	protected:

		LaurinModuleHandler();
		void startHandler(int count);


	private:

		int _modules;
		int _modules_count;
		bool _running;
		bool _error;
		Glib::ustring _errmess;

		Glib::Mutex _mutex;


};

#endif
